<?php
session_start();
switch ($_REQUEST["action"]) {
    case "dTe90vlyihil":
        $_SESSION["CONTENT"] = "../view/administration/colaborador/colaborador_view.html";
        $html = file_get_contents($_SESSION["CONTENT"]);
        
    case "viewColDgffs44tsD2rg4s":
        
        echo $html;
        break;
    case "menu445Ddds5dGyPyd":
        $menu_temaplte = navigation_controller::get_menu_left();
        
        echo $menu_temaplte;
        break;
    case "contentRyuiOpjJy65Grgj5A":
        $content = navigation_controller::get_content_actualy();
        echo $content;
        break;
}

/**
 * Description of NavigationController
 *
 * @author Max
 */
class navigation_controller {

    


    /**
     * ANTES: COGER TEMPLATE PARA LOGIN
     */
    public function before_login_template() {
        $_SESSION["CONTENT"] = "../view/template/home.html";
        $_SESSION["MENU"] = "../view/template/menu_left.html";
    }

    /**
     * DESPUÉS DE LOGEARSE -> FALTA HACER ROLES
     */
    public function after_login_template() {
        $html_temp = file_get_contents("view/template/principal.html");

        //$menu_left = file_get_contents("view/template/menu_left.html");
        $menu_top = file_get_contents("view/template/menu_top.html");
        
        $html_temp = str_replace("{titulo_pagina}", "FIT HOTEL", $html_temp);
        //$html_temp = str_replace("{menu_left}", $menu_left, $html_temp);
        $html_temp = str_replace("{menu_top}", $menu_top, $html_temp);
        //$html_temp = str_replace("{content_default}", file_get_contents($_SESSION["CONTENT"]), $html_temp);

        echo $html_temp;
    }

    public static function get_menu_left() {
        $menu_left = file_get_contents($_SESSION["MENU"]);
        return $menu_left;
    }
    
    public static function get_content_actualy() {
        $content = file_get_contents($_SESSION["CONTENT"]);
        return $content;
    }
}

?>